//////////////////////////////////////////////////////////////////////////
// PeekPocket - the hassle-free WiFi scanner for Windows Mobile
// coded by dzolee
// http://dzolee.blogspot.com
//
// ScannerDlg - this is the AP list tab
//////////////////////////////////////////////////////////////////////////

#pragma once

#include "afxcmn.h"
#include "ColoredDlg.h"
#include "ListCtrlEx.h"
#include "oscopectrl.h"

// CWifiDevicesDlg dialog

class CScannerDlg : public CColoredDlg
{
	DECLARE_DYNAMIC(CScannerDlg)

	enum ViewModesEnum
	{
		vmNormal,
		vmLarge,
		vmHistory
	};

public:
	CScannerDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CScannerDlg();
	void SetListFont(int iFontSize);
	void UpdateList();

// Dialog Data
	enum { IDD = IDD_SCANNER_DLG };

	int m_iSelectedID;

	void ReturnToNormalMode();

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();

	afx_msg void OnPaint();
	afx_msg void OnPopupGolarge();
	afx_msg void OnPopupHistory();
	afx_msg void OnPopupConnect();
	afx_msg void OnPopupDisconnect();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLvnGetdispinfoList(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnNMClickDeviceList(NMHDR *pNMHDR, LRESULT *pResult);

	DECLARE_MESSAGE_MAP()

	void ApplyListFont();

	bool m_bListFontApplied;
	int m_iListFontSize;

	ViewModesEnum m_ViewMode;

	CListCtrlEx m_list;
	CFont m_listfont;
	CString m_numactive;
	CString m_rb_static;
public:
	COScopeCtrl m_OScope;
};
